package com.jic.product.mapper;

import com.jic.product.entity.ProductPropertyName;
import com.jic.product.manage.request.ProductPropertyNameEditRequest;
import com.jic.product.manage.response.ProductPropertyNameResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品属性名称表
 * @author : 
 * @email : 
 * @since : 2020-01-10 07:03:01
 * @version : v1.0.0
 */
@Mapper
public interface  ProductPropertyNameMapper {

    long insert(ProductPropertyNameEditRequest productPropertyNameEditRequest);

    long delete(Long id);

    long deleteByPropertyId(Long propertyId);

    long update(ProductPropertyNameEditRequest productPropertyNameEditRequest);

    ProductPropertyName queryByPrimaryKey(Long id);

    List<ProductPropertyName> query(ProductPropertyName productPropertyName);

    List<ProductPropertyNameResponse> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("productPropertyName") ProductPropertyName productPropertyName);

    long queryPageCount(ProductPropertyName productPropertyName);

    List<ProductPropertyName> queryByNameAndCode(@Param("name") String name,@Param("code") String code,@Param("deptId") Long deptId);//根据属性名称和编码查询

    ProductPropertyNameResponse queryPropertyValueById(@Param("productPropertyName") ProductPropertyName productPropertyName);
}